package com.example.forum_system.dao;

import com.example.forum_system.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    int insert(User row);

    int insertSelective(User row);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User row);

    int updateByPrimaryKey(User row);

    /**
     * 注解 @Param("username") 为 SQL 传入的参数名
     * @param username Java 代码中使用的变量名
     */
    User selectByUserName(@Param("username") String username);
}